﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KylinORM.Utils;

namespace KylinORM.Data
{
    /// <summary>
    /// 数据访问类管理器
    /// </summary>
    public abstract class DataProvider
    {
        static DataProvider()
        {
            IOCContainer.RegisterType(typeof(IDataProvider), ConfigManager.DefaultDataProvider);
        }
        /// <summary>
        /// 得到已注册的数据访问类
        /// </summary>
        /// <returns></returns>
        public static IDataProvider GetInstance()
        {
            return IOCContainer.Singleton<IDataProvider>();       
        }

    }
}
